<template>
	<view>
		<swiper class="swiper"
						indicator-dots
						indicator-active-color="#fff"
						autoplay
						interval="3000"
						circular>
			<block v-for="item in imgArr" :key="item.id">
				<swiper-item class="swiper-item">
					<image :src="item.img" mode="widthFix"></image>
				</swiper-item>
			</block>
		</swiper>
	</view>
</template>

<script>
	export default {
		props: {
			imgArr: {
				type: Array,
				default() {
					return []
				}
			}
		}
	}
</script>

<style lang="scss">
	.swiper {
		width: 100%;
		height: calc(100vw * 390 / 750);
		image {
			width: 100%;
		}
	}
</style>
